package edu.pku.sei.sct.match;

import java.util.List;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EReference;

import choco.kernel.model.constraints.ComponentConstraint;
import choco.kernel.model.constraints.ConstraintType;
import choco.kernel.model.variables.Variable;
import choco.kernel.model.variables.integer.IntegerVariable;

public class LinkCondition extends ComponentConstraint {
	
	public String sourceScope;
	public LinkCondition(IntegerVariable src, IntegerVariable tar, String sourceScope, EClass sourceType,
			String targetScope, EClass targetType, EReference reference) {
		super(ConstraintType.TABLE, new Object[]{true,null}, new IntegerVariable[]{src,tar});
		
		this.sourceScope = sourceScope;
		this.sourceType = sourceType;
		this.targetScope = targetScope;
		this.targetType = targetType;
		this.reference = reference;
	}
	
	public void setParameter(List<int[]> tab) {
		((Object[])this.parameters)[1] = tab;
	}

	public EClass sourceType;
	public String targetScope;
	public EClass targetType;
	public EReference reference;
}
